package com.ymt.bpm.service.platform.fauth;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.ymt.bpm.model.PRole;

/**
 * Created by Johnny on 2017/3/19.
 */
public interface FaRoleService {

    public JSONObject query(String tenantId,
                            String roleType,
                            String search,
                            String sort,
                            String order,
                            int offset,
                            int limit,
                            int timezoneOffset);

    public JSONObject save(String tenantId, String loginName, String displayName, PRole role);

    public JSONObject get(String tenantId, String orgId, String roleId, String lang, int timezoneOffset);

    public JSONObject delete(String tenantId, String loginName, String displayName, String orgId, String roleId);

    public String checkAttr(String tenantId, String attrName, String value, String roleId);

    public JSONArray getGrant(String tenantId, String roleId, String resControl);

    public JSONObject saveGrant(String tenantId, String loginName, String displayName,
                                String roleId, String resIds, String resControl);

    public JSONArray getMember(String tenantId, String roleId, String memberType);

    public JSONObject saveMember(String tenantId, String loginName, String displayName, String roleId, String members);

    String queryDhx(String tenantId, String queryParams,
                    int fInd, int lInd,
                    int timezoneOffset, String lang, String ordercolumns);

}
